package com.wn.date20190807FingerGuessingGame;

public class Player
{
	private String name;// 用户名
	private int point; // 点数
	public static final int ROCK=1;// 石头
	public static final int SCISSORS=2;// 剪刀
	public static final int PAPER=3;// 布
	
	/**
	 * 构造
	 */
	public Player() 
	{
		this.name="匿名";
		this.point=0;
	}
	public Player(String name)
	{
		this.name=name;
		this.point=0;
	}
	/**
	 * 机器出拳
	 * @return string 石头剪刀布
	 */
	public String showFirst1() 
	{
		// 生成0,1,2随机数
		int num=(int)(Math.random()*3+1);
		switch (num)
		{
		case ROCK:
			return "石头";
		case PAPER:
			return "布";
		case SCISSORS:
			return "剪刀";
		}
		return "出拳错误";

	}
	
	public String showFirst1(int num)
	{
		switch (num)
		{
		case ROCK:
			return "石头";
		case PAPER:
			return "布";
		case SCISSORS:
			return "剪刀";
		}
		return "出拳错误";
	}
	
	public String getName()
	{
		return name;
	}
	public void setName(String name)
	{
		this.name = name;
	}
	public int getPoint()
	{
		return point;
	}
	public void setPoint(int point)
	{
		this.point = point;
	}
	public void showFirst() {
		
	}
}
